//app.js
App({
  onLaunch: function () {
    var _this = this
    wx.getSystemInfo({
      success: function (res) {
        _this.globalData.winW = res.windowWidth
        _this.globalData.winH = res.windowHeight
      }
    })
  },
  globalData: {
    winW: 0,
    winH: 0
  },
  // 存储上下车 信息
  storageJson: function (latitude, longitude, address, key) {
    var json = {}
    json.latitude = latitude
    json.longitude = longitude
    json.address = address
    wx.setStorage({
      key: key,
      data: json
    })
  },
  // 从本地缓存中异步移除指定 key 
  removeStorage: function (key) {
    wx.removeStorage({
      key: key,
      success: function (res) {
      }
    })
  }
})